﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="StrategicDataSystems.Cloud.Monitoring.UI.App"
             Startup="App_Startup" Exit="App_Exit" >
    <Application.Resources>


        <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:tb="http://www.hardcodet.net/taskbar">
            
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Resources/SysTrayContextMenu.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <tb:TaskbarIcon x:Key="SysTrayIcon" 
                            ContextMenu="{StaticResource SysTrayContextMenu}"
                            ToolTipText="Greybox">
                <tb:TaskbarIcon.Style>
                    <Style TargetType="{x:Type tb:TaskbarIcon}">
                        <Style.Setters>
                            <Setter Property="IconSource" Value="/Resources/GreyCube.ico" />
                        </Style.Setters>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Path=SubscriptionHasCurrentDeployments, Mode=OneWay}" Value="true">
                                <Setter Property="IconSource" Value="/Resources/BlueCube.ico" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </tb:TaskbarIcon.Style>
            </tb:TaskbarIcon>
        </ResourceDictionary>

    </Application.Resources>
</Application>
